package com20230218;

import java.util.Arrays;

public class RoseFlower {
    public static void main(String[] args) {
        int[] arr1 = rose();


        System.out.println(Arrays.toString(arr1));
    }


    public static int[] rose(){

        int length = 0;
        int[] arr = new int[length];

        for (int i = 0; i < arr.length; i++) {

            for (int j = 1000; j < 10000; j++) {
                int q = j / 1000;
                int b = j / 100 % 10;
                int s = j / 10 % 10;
                int g = j % 10;
                if (Math.pow(q,4) + Math.pow(b,4) + Math.pow(s,4) + Math.pow(g,4) == j){
                    length++;
                    arr[length-1] = j;
                }

            }
        }
        return arr;
    }






}
